import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from 'material-ui/styles'
import CommonItem from './commen_item'

import style from './style/recent_item'

const RecentRelies = (props) => {
  const { replies, classes } = props
  return (
    <div className={classes.topics}>
      { replies && replies.length ?
        replies.map(item => <CommonItem topic={item} key={item.id} />) : null
      }
    </div>

  )
}
export default withStyles(style)(RecentRelies)

RecentRelies.propTypes = {
  replies: PropTypes.arrayOf(Object),
  classes: PropTypes.objectOf(Object),
}
